Skip to content

B-Extra: native Flows editor on the device, offline - #437

Merged
bubulux merged 1 commit into
mainfrom
feat/426-flows-native
Nov 25, 2026
Merged

bubulux merged 1 commit into
mainfrom
feat/426-flows-native

Conversation

@bubulux

@bubulux bubulux commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

Part of #426 (B-Extra), step 7 of 7: the native Flows editor on the device, full and offline (R12).

What changed

  • Shared editing rules (packages/ext-flows/src/edit.ts, with tests): add a track, a keyframe and a marker; move and remove; change the length. These are the same rules the Studio follows.
  • Flows kept on the device (apps/mobile/src/ext/flows/store.ts): the project's flows open, change and play without a connection. New flows can be made offline too.
  • Saving:
    • Every change is kept on the device at once and sent about a second later, or with the next sync.
    • Online, the editor holds the edit lock (renewed every 30 s) and saves under it. If someone else holds it, the flow is read-only on the device and shows their saves.
    • Conflict rule: if the server's flow changed meanwhile or was deleted, the device's version is saved beside it as "… (from this device)". Nothing is lost and nothing is overwritten.
  • Native editor (ui/Editor.tsx, ui/Lanes.tsx, ui/Inspect.tsx):
    • Ruler (tap sets the playhead), marker strip, one lane per track with labels beside them, zoom from 1× to 32×.
    • Select and Insert modes: in Insert, a tap adds a keyframe or a marker. Keyframes are tapped to choose them and dragged to move them; the strip between two keyframes selects the fade.
    • Sheets for a light's keyframe, a camera's keyframe, a fade, a marker and a track (device, muted, colour), plus Add a track and the flow settings (name, length, loop, Live).
    • Play and Live run through this device's own connections; "Hold the connections here" switches the proxy on.
  • The phone's web view for flows and the Studio's #/embed/flow route are removed. Run on device from the Studio is unchanged.

Not tested

Nothing of this has run on a device (typecheck and unit tests only). The gaps are listed in docs/known-issues.md. Only JavaScript changed, so Metro serves it to the current dev build; no new build is needed.

Checked

  • make check green.

🤖 Generated with Claude Code

- packages/ext-flows: the editing rules both editors follow (edit.ts: add a track, a keyframe, a
  marker; move, remove; change the length), with tests.
- Phone and tablet: the project's flows kept on the device (store.ts); changes kept at once and sent
  under the edit lock while online, freely offline; a flow changed elsewhere meanwhile gets the
  device's version beside it as a copy. The native editor (Editor, Lanes, Inspect): ruler, marker
  strip, lanes with zoom, Select/Insert, keyframes tapped and dragged, sheets for keyframes, fades,
  markers and tracks, add a track, the flow's settings; Play and Live through this device's own
  connections. The web view and the Studio's flow embed are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bubulux
bubulux merged commit fe0730d into main Nov 25, 2026
5 checks passed
@bubulux bubulux mentioned this pull request Nov 25, 2026
41 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant